﻿using BootstrapBlazor.Components;
using OnWork.DataCenter.DAL.DataCenter;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OnWork.DataCenter.Shared.Pages.DataStandard
{
    /// <summary>
    /// 数据标准视图对象
    /// </summary>
    public class DataStandardConfigVO
    {

        /// <summary>
        /// 主键
        /// </summary>
        [AutoGenerateColumn(Visible = false, Readonly = true)]
        public long ID { get; set; }

        ///// <summary>
        ///// 父级ID
        ///// </summary>
        //[AutoGenerateColumn(Visible = false, Editable = false)]
        //public long ParentId { get; set; }

        /// <summary>
        /// 配置名称
        /// </summary>
        [Required(ErrorMessage = "{0}不能为空"), MaxLength(255)]
        [AutoGenerateColumn(Text = "配置名称", Searchable = true, Filterable = true, Sortable = true), DisplayName("配置名称")]
        public string Name { get; set; }

        /// <summary>
        ///需要解析的数据示例
        /// </summary>
        [AutoGenerateColumn(Text = "数据示例",ShowTips =true,TextEllipsis =true,Width =260), DisplayName("数据示例")]
        public string DataDemo { get; set; }

        /// <summary>
        /// 数据类型
        /// </summary>
        [AutoGenerateColumn(Text = "数据类型", Searchable = true, Filterable = true, Sortable = true), DisplayName("数据类型")]
        public DataStandardType DataType { get; set; } = DataStandardType.Json;

        /// <summary>
        /// 输出类型
        /// </summary>
        [AutoGenerateColumn(Text = "输出类型", Searchable = true, Filterable = true, Sortable = true), DisplayName("输出类型")]
        public DataStandardType OutType { get; set; } = DataStandardType.DataTable;

        /// <summary>
        ///标准配置
        /// </summary>
        [AutoGenerateColumn(Text = "配置标准", ShowTips = true, TextEllipsis = true, Width = 260), DisplayName("配置标准")]
        public string StandardConfig { get; set; }
    }
}
